﻿package Welsy4.Connect.vo 
{
	
	/**
	 * ...
	 * @author DefaultUser (Tools -> Custom Arguments...)
	 */
	public class Calendar 
	{
		
		public function Calendar() 
		{
		
		}
		
		public static function generateUTCdateFromTimestamp():void {
		    	
		}
		
		/**
		 * restiruisce una stringa "YYYY-MM-DDTh:m" es. 2006-10-01T17:00
		 * @return data odierna per Adobe Connect
		 */
		public static function getAdobeConnectDate(d:Date):String {
		    var s:String = "";
			s = d.getUTCFullYear() + "-" + addZero(d.getUTCMonth() + 1) + "-" + addZero(d.getUTCDate()) + "T" + addZero(d.getUTCHours()) + ":" + addZero(d.getUTCMinutes());
			return s;	
		}
		
		public static function addZero(n:Number):String {
		    if (n < 10) {
				return "0" + n;
				}	
			return "" + n;	
		}
	}
	
}